/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package listas;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.FacesConverter;

/**
 *
 * @author nivri
 */
@FacesConverter(value ="player")
public class autoconverter implements Converter{
autocompletelista con = new autocompletelista();
    @Override
    public Object getAsObject(FacesContext context, UIComponent component, String value) {
       con.setId(value);
       return con;
    }
    
    @Override
    public String getAsString(FacesContext context, UIComponent component, Object value) {
        autocompletelista c =  (autocompletelista) value;
        return c.getId();
    }
    
}
